```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tomcat全面指南 | 技术小馆</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .feature-icon {
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
        }
        .dark-overlay {
            position: relative;
        }
        .dark-overlay::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white dark-overlay">
        <div class="container mx-auto px-6 py-24 relative z-10">
            <div class="max-w-3xl mx-auto text-center">
                <h1 class="text-4xl md:text-5xl font-bold mb-6">探索Tomcat的奥秘</h1>
                <p class="text-xl md:text-2xl opacity-90 mb-8">全面解析Java Servlet容器的核心概念、安装配置与最佳实践</p>
                <div class="flex justify-center space-x-4">
                    <a href="#intro" class="px-6 py-3 bg-white text-blue-800 font-medium rounded-lg hover:bg-gray-100 transition duration-300">
                        <i class="fas fa-book-open mr-2"></i>开始学习
                    </a>
                    <a href="#guide" class="px-6 py-3 border-2 border-white text-white font-medium rounded-lg hover:bg-white hover:text-blue-800 transition duration-300">
                        <i class="fas fa-download mr-2"></i>安装指南
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container mx-auto px-6 py-12 max-w-6xl">
        <!-- Introduction Section -->
        <section id="intro" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-blue-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-info-circle text-blue-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat简介</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 items-center mb-8">
                <div>
                    <p class="text-gray-700 mb-6 text-lg leading-relaxed">
                        Tomcat（全称Apache Tomcat）是一个开源的、轻量级的Java Servlet容器，由Apache软件基金会开发和维护。作为一个Java Servlet容器，Tomcat的主要功能是运行Java Servlet和JavaServer Pages（JSP）等Java EE技术的Web应用程序。
                    </p>
                    <div class="bg-blue-50 border-l-4 border-blue-500 p-4 mb-6">
                        <p class="text-blue-800 font-medium">
                            <i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
                            Tomcat是Java Web开发的基石，了解其原理和配置是每个Java开发者的必备技能
                        </p>
                    </div>
                </div>
                <div class="rounded-xl overflow-hidden shadow-lg">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486453432-5868c23d-6f14-411a-83d3-b7f62e169b1c.png" alt="Tomcat Logo" class="w-full h-auto">
                </div>
            </div>
        </section>

        <!-- Features Section -->
        <section id="features" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-purple-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-star text-purple-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat的主要特性</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6 mb-8">
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-purple-100 text-purple-600 mb-4">
                        <i class="fas fa-code text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">支持Java Servlet和JSP技术</h3>
                    <p class="text-gray-600">Tomcat是一个Java Servlet容器，支持Java Servlet和JavaServer Pages（JSP）等Java EE技术，用于构建动态的Web应用程序。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-blue-100 text-blue-600 mb-4">
                        <i class="fas fa-tachometer-alt text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">轻量级且易于安装配置</h3>
                    <p class="text-gray-600">Tomcat采用轻量级设计，安装简单、配置灵活，易于管理和维护，是Java Web应用服务器中较为流行的选择之一。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-green-100 text-green-600 mb-4">
                        <i class="fas fa-rocket text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">高性能和可伸缩性</h3>
                    <p class="text-gray-600">Tomcat具有良好的性能和可伸缩性，能够处理大量并发请求，并且能够通过集群和负载均衡等方式实现水平扩展。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-yellow-100 text-yellow-600 mb-4">
                        <i class="fas fa-layer-group text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">支持多版本规范</h3>
                    <p class="text-gray-600">Tomcat支持多个版本的Java Servlet和JSP规范，可以满足不同版本的Java Web应用程序的需求。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-red-100 text-red-600 mb-4">
                        <i class="fab fa-osi text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">开源和免费</h3>
                    <p class="text-gray-600">Tomcat是一个开源项目，遵循Apache许可证，可以免费使用和修改，用户可以根据自己的需求对Tomcat进行定制和扩展。</p>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-md card-hover">
                    <div class="feature-icon bg-indigo-100 text-indigo-600 mb-4">
                        <i class="fas fa-puzzle-piece text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">丰富的功能和扩展性</h3>
                    <p class="text-gray-600">Tomcat提供了丰富的功能和扩展性，支持SSL/TLS加密、HTTP/2协议、连接池、虚拟主机、安全管理等功能。</p>
                </div>
            </div>
            
            <div class="text-center">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486646623-deb70cd4-be26-43c3-a9b5-44c567d50c02.png" alt="Tomcat Features" class="mx-auto rounded-lg shadow-md max-w-full h-auto">
            </div>
        </section>

        <!-- Installation Guide -->
        <section id="guide" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-green-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-download text-green-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat的安装和配置</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                <div class="md:flex">
                    <div class="md:w-1/2 p-8">
                        <div class="flex items-start mb-6">
                            <div class="bg-blue-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-cloud-download-alt text-blue-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">1. 下载Tomcat</h3>
                                <p class="text-gray-600">从Apache Tomcat官方网站下载最新版本的Tomcat压缩文件（tar.gz或zip格式）到本地计算机。</p>
                                <a href="https://tomcat.apache.org/download.cgi" class="text-blue-600 hover:text-blue-800 inline-block mt-2">访问下载页面 <i class="fas fa-external-link-alt ml-1"></i></a>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-green-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-file-archive text-green-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">2. 解压文件</h3>
                                <p class="text-gray-600">将下载的压缩文件解压缩到你选择的目录中。你可以选择将Tomcat解压到任意目录，只要确保你有权限在那个目录中运行Tomcat。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-yellow-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-cog text-yellow-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">3. 设置环境变量（可选）</h3>
                                <p class="text-gray-600">为了方便在命令行中使用Tomcat命令，你可以设置<code class="bg-gray-100 px-1 rounded">CATALINA_HOME</code>环境变量，指向你解压的Tomcat目录。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-purple-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-power-off text-purple-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">4. 启动Tomcat</h3>
                                <p class="text-gray-600">进入Tomcat的<code class="bg-gray-100 px-1 rounded">bin</code>目录，执行启动脚本。在Windows系统上，执行<code class="bg-gray-100 px-1 rounded">startup.bat</code>，在Unix/Linux系统上，执行<code class="bg-gray-100 px-1 rounded">startup.sh</code>。</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="md:w-1/2 bg-gray-50 p-8">
                        <div class="flex items-start mb-6">
                            <div class="bg-red-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-check-circle text-red-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">5. 验证安装</h3>
                                <p class="text-gray-600">打开Web浏览器，并访问Tomcat的默认URL：<code class="bg-gray-100 px-1 rounded">http://localhost:8080</code>。如果一切正常，你将看到Tomcat的欢迎页面。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-indigo-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-user-shield text-indigo-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">6. 管理Tomcat</h3>
                                <p class="text-gray-600">Tomcat的默认管理界面位于<code class="bg-gray-100 px-1 rounded">http://localhost:8080</code>，可以在该界面上对Tomcat进行管理和配置。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-pink-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-sliders-h text-pink-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">7. 配置Tomcat</h3>
                                <p class="text-gray-600">根据你的需求，你可以对Tomcat的配置文件进行修改，以定制化Tomcat的行为。Tomcat的主要配置文件位于<code class="bg-gray-100 px-1 rounded">conf</code>目录下。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-teal-100 rounded-lg p-2 mr-4">
                                <i class="fas fa-server text-teal-600 text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">8. 部署Web应用</h3>
                                <p class="text-gray-600">将你开发好的Java Web应用程序（war文件）复制到Tomcat的<code class="bg-gray-100 px-1 rounded">webapps</code>目录下，Tomcat将自动部署并启动你的应用程序。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="text-center">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708487415244-d6e0550e-df18-47f4-8b36-f179639441f7.png" alt="Tomcat Installation" class="mx-auto rounded-lg shadow-md max-w-full h-auto">
            </div>
        </section>

        <!-- Directory Structure -->
        <section id="directory" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-orange-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-folder-open text-orange-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat的目录结构</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                <div class="grid md:grid-cols-2 gap-8 p-8">
                    <div>
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-terminal text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">bin目录</h3>
                                <p class="text-gray-600">包含Tomcat的可执行文件，如启动和关闭脚本（startup.sh、shutdown.sh或startup.bat、shutdown.bat），以及其他用于管理Tomcat服务器的脚本文件。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-cog text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">conf目录</h3>
                                <p class="text-gray-600">包含Tomcat的配置文件，其中最重要的是<code class="bg-gray-100 px-1 rounded">server.xml</code>，用于配置Tomcat服务器的基本设置，如连接器、虚拟主机等。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-box-open text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">lib目录</h3>
                                <p class="text-gray-600">包含Tomcat运行时所需的Java类库文件（JAR文件），以及用于扩展Tomcat功能的额外JAR文件。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-clipboard-list text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">logs目录</h3>
                                <p class="text-gray-600">包含Tomcat的日志文件，如catalina.out、localhost_access_log.txt等，用于记录Tomcat服务器的运行日志和访问日志。</p>
                            </div>
                        </div>
                    </div>
                    
                    <div>
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-globe text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">webapps目录</h3>
                                <p class="text-gray-600">是Tomcat默认用于存放Web应用程序（WAR文件）的位置。每个WAR文件对应一个独立的Web应用，当Tomcat启动时，它会自动解压WAR文件并部署应用。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-file-code text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">work目录</h3>
                                <p class="text-gray-600">是Tomcat用于存放临时工作文件的目录，如JSP文件的编译结果等。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start mb-6">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-temp-high text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">temp目录</h3>
                                <p class="text-gray-600">用于存放Tomcat运行时的临时文件。</p>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-gray-100 rounded-lg p-3 mr-4">
                                <i class="fas fa-home text-gray-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">webapps/ROOT目录</h3>
                                <p class="text-gray-600">是Tomcat的默认Web应用程序，通常指向Tomcat的欢迎页面。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="text-center">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486888161-4d373f84-7dcf-4a5a-ab16-193a71b796c5.png" alt="Tomcat Directory Structure" class="mx-auto rounded-lg shadow-md max-w-full h-auto">
            </div>
        </section>

        <!-- Deployment Guide -->
        <section id="deployment" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-indigo-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-upload text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">部署Web应用程序</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-8 mb-8">
                <div class="grid md:grid-cols-3 gap-6">
                    <div class="bg-blue-50 p-6 rounded-lg border-l-4 border-blue-500">
                        <h3 class="text-xl font-semibold mb-3 text-blue-800">1. 准备Web应用程序</h3>
                        <p class="text-gray-700">确保你的Web应用程序已经打包成WAR文件。WAR文件是Java Web应用程序的标准部署格式，它包含了所有的Web资源（JSP、HTML、CSS、JavaScript等）、Java类文件、配置文件等。</p>
                    </div>
                    
                    <div class="bg-green-50 p-6 rounded-lg border-l-4 border-green-500">
                        <h3 class="text-xl font-semibold mb-3 text-green-800">2. 复制到webapps目录</h3>
                        <p class="text-gray-700">将准备好的WAR文件复制或移动到Tomcat的webapps目录下。一旦WAR文件被放置在这个目录下，Tomcat会自动解压并部署Web应用程序。</p>
                    </div>
                    
                    <div class="bg-purple-50 p-6 rounded-lg border-l-4 border-purple-500">
                        <h3 class="text-xl font-semibold mb-3 text-purple-800">3. 启动Tomcat服务器</h3>
                        <p class="text-gray-700">在命令行或通过启动脚本（如startup.sh或startup.bat）启动Tomcat服务器。</p>
                    </div>
                    
                    <div class="bg-yellow-50 p-6 rounded-lg border-l-4 border-yellow-500">
                        <h3 class="text-xl font-semibold mb-3 text-yellow-800">4. 访问Web应用程序</h3>
                        <p class="text-gray-700">一旦Tomcat启动成功，你可以在浏览器中访问部署的Web应用程序。通常情况下，可以通过访问<code class="bg-yellow-100 px-1 rounded">http://localhost:8080/你的应用程序名称</code>来访问部署的应用程序。</p>
                    </div>
                    
                    <div class="bg-red-50 p-6 rounded-lg border-l-4 border-red-500">
                        <h3 class="text-xl font-semibold mb-3 text-red-800">5. 查看日志信息</h3>
                        <p class="text-gray-700">如果部署过程中出现了问题，可以查看Tomcat的日志文件（位于logs目录下）来检查错误信息，帮助解决部署问题。</p>
                    </div>
                    
                    <div class="bg-indigo-50 p-6 rounded-lg border-l-4 border-indigo-500">
                        <h3 class="text-xl font-semibold mb-3 text-indigo-800">6. 额外提示</h3>
                        <p class="text-gray-700">对于生产环境，建议修改默认的管理员密码，并设置适当的安全配置以保护你的Tomcat服务器。</p>
                    </div>
                </div>
            </div>
            
            <div class="text-center">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708487111499-9a423ba5-b00f-44c2-9754-6d69894d80e3.png" alt="Tomcat Deployment" class="mx-auto rounded-lg shadow-md max-w-full h-auto">
            </div>
        </section>

        <!-- Architecture Section -->
        <section id="architecture" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-teal-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-project-diagram text-teal-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat的体系结构</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-8 mb-8">
                <div class="mermaid mb-8">
                    graph TD
                        A[Tomcat] --> B[Servlet容器]
                        A --> C[连接器 Connectors]
                        A --> D[服务 Service]
                        D --> E[引擎 Engine]
                        D --> F[虚拟主机 Host]
                        E --> G[上下文 Context]
                        G --> H[类加载器 ClassLoader]
                        C -->|HTTP| I[HTTP连接器]
                        C -->|AJP| J[AJP连接器]
                        F --> K[Web应用1]
                        F --> L[Web应用2]
                </div>
                
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-white p-6 rounded-lg border border-gray-200">
                        <h3 class="text-xl font-semibold mb-4 text-teal-700">核心组件</h3>
                        <ul class="space-y-4">
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-server text-sm"></i></span>
                                <span><strong>Servlet容器</strong>：处理Servlet和JSP页面的请求，实现了Servlet API和JSP规范</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-plug text-sm"></i></span>
                                <span><strong>连接器</strong>：处理Tomcat与外部客户端的通信，支持HTTP和AJP协议</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-cogs text-sm"></i></span>
                                <span><strong>服务</strong>：包含多个连接器和一个引擎，提供完整的服务功能</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div class="bg-white p-6 rounded-lg border border-gray-200">
                        <h3 class="text-xl font-semibold mb-4 text-teal-700">运行机制</h3>
                        <ul class="space-y-4">
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-microchip text-sm"></i></span>
                                <span><strong>引擎</strong>：处理所有接收到的请求，一个Tomcat实例可以有多个引擎</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-sitemap text-sm"></i></span>
                                <span><strong>虚拟主机</strong>：允许在同一个Tomcat实例中运行多个Web应用程序</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-teal-100 text-teal-600 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1"><i class="fas fa-code text-sm"></i></span>
                                <span><strong>上下文</strong>：每个Web应用程序的配置信息集合，包含部署信息、Servlet映射等</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <div class="text-center">
                <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708491602422-83ab6fb6-b2be-4ced-8a43-a1f42760edf4.png" alt="Tomcat Architecture" class="mx-auto rounded-lg shadow-md max-w-full h-auto">
            </div>
        </section>

        <!-- Mind Map Section -->
        <section id="mindmap" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-pink-100 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-sitemap text-pink-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">Tomcat知识导图</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-8">
                <div class="text-center mb-6">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1708486768284-2fbb024e-73e5-4aeb-8213-cb5b3e1173e5.png" alt="Tomcat Mindmap Preview" class="mx-auto rounded-lg shadow-md max-w-full h-auto mb-4">
                    <a href="https://www.yuque.com/attachments/yuque/0/2023/xmind/21449790/1692787933040-fd79d455-d730-412e-98e2-7c4d671b19dc.xmind" class="inline-block px-6 py-3 bg-pink-600 text-white rounded-lg hover:bg-pink-700 transition duration-300">
                        <i class="fas fa-download mr-2"></i>下载完整导图(XMind格式)
                    </a>
                </div>
                
                <div class="bg-gray-50 p-6 rounded-lg">
                    <h3 class="text-xl font-semibold mb-4">导图内容概览</h3>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2 flex items-center">
                                <i class="fas fa-check-circle text-pink-500 mr-2"></i>核心概念
                            </h4>
                            <ul class="list-disc list-inside text-gray-600 pl-4">
                                <li>Servlet容器</li>
                                <li>JSP支持</li>
                                <li>连接器类型</li>
                                <li>请求处理流程</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2 flex items-center">
                                <i class="fas fa-check-circle text-pink-500 mr-2"></i>配置管理
                            </h4>
                            <ul class="list-disc list-inside text-gray-600 pl-4">
                                <li>server.xml详解</li>
                                <li>web.xml配置</li>
                                <li>上下文配置</li>
                                <li>虚拟主机设置</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2 flex items-center">
                                <i class="fas fa-check-circle text-pink-500 mr-2"></i>性能优化
                            </h4>
                            <ul class="list-disc list-inside text-gray-600 pl-4">
                                <li>线程池配置</li>
                                <li>JVM调优</li>
                                <li>缓存策略</li>
                                <li>集群配置</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-medium text-gray-700 mb-2 flex items-center">
                                <i class="fas fa-check-circle text-pink-500 mr-2"></i>安全实践
                            </h4>
                            <ul class="list-disc list-inside text-gray-600 pl-4">
                                <li>SSL/TLS配置</li>
                                <li>访问控制</li>
                                <li>安全加固</li>
                                <li>漏洞防护</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-6">
            <div class="text-center">
                <h3 class="text-xl font-medium mb-4">技术小馆</h3>
                <p class="mb-6">探索技术世界的奥秘，分享专业知识的殿堂</p>
                <div class="flex justify-center space-x-4">
                    <a href="http://www.yuque.com/jtostring" class="text-gray-400 hover:text-white transition duration-300">
                        <i class="fas fa-globe text-lg"></i>
                    </a>
                </div>
                <div class="mt-6">
                    <a href="http://www.yuque.com/jtostring" class="text-gray-400 hover:text-white underline transition duration-300">http://www.yuque.com/jtostring</a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```